package com.beetlestech.nfe.main.biz.com.impl;

import java.util.List;

import com.beetlestech.nfe.fw.core.biz.AbstractDBLogic;
import com.beetlestech.nfe.main.biz.com.HbFeedback;
import com.beetlestech.nfe.main.biz.constant.CommonConstant;
import com.beetlestech.nfe.main.biz.constant.CtgCodeConstant;
import com.beetlestech.nfe.main.biz.constant.HbMessageCode;
import com.beetlestech.nfe.main.db.constant.SQLConstant;
import com.beetlestech.nfe.main.db.tbl.FeedbackDTO;
import com.beetlestech.nfe.main.db.tbl.UsermessageDTO;

public class HbFeedbackImpl extends AbstractDBLogic
		implements HbFeedback, CtgCodeConstant, HbMessageCode, CommonConstant, SQLConstant {

	@Override
	public void saveFeedback(String title, String content, Integer uid) {
		FeedbackDTO feedbackMessage = new FeedbackDTO();
		feedbackMessage.setTitel(title);
		feedbackMessage.setMessage(content);
		feedbackMessage.setSenderId(uid);
		feedbackMessage.setReceiveId(SERVER_ID);
		feedbackMessage.setSendDT(getCurrentDate());
		feedbackMessage.setSendTime(getCurrentTime());
		feedbackMessage.setReadflg(Integer.parseInt(CATAGORY_P_MESSAGE_STATE.UNREAD.toString()));
		updateDAO.update(FeedbackDTO.INSERT, feedbackMessage);

	}

}
